﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MathLib.Geometry
{
    public static class Pythagoras
    {
        public static double Hypotenuse(double leg1, double leg2)
        {
            return Math.Sqrt(Math.Pow(leg1, 2) + Math.Pow(leg2, 2));
        }
        public static double Leg2(double leg1, double hypotenuse)
        {
            return Math.Sqrt(Math.Pow(hypotenuse, 2) - Math.Pow(leg1, 2));
        }
    }
}